![]() |
ALMaSS
1.0
The Animal, Landscape and Man Simulation System
|
#include <pesticide.h>
Public Member Functions | |
PesticideMap (int a_startyear, int a_noyears, int a_cellsize, Landscape *a_landscape, RasterMap *a_land, bool a_typeofmap) | |
~PesticideMap () | |
bool | DumpPMap (vector< double > *a_map) |
bool | DumpPMapI () |
bool | DumpPMapH () |
bool | DumpPMapF () |
void | Spray (LE *a_element_sprayed, TTypesOfPesticideCategory a_type) |
Protected Attributes | |
vector< double > * | m_pmap_insecticides |
insecticide map data More... | |
vector< double > * | m_pmap_fungicides |
herbicide map data More... | |
vector< double > * | m_pmap_herbicides |
fungicide map data More... | |
int | m_startyear |
first simultion year to record More... | |
int | m_endyear |
last year of data to record More... | |
int | m_cellsize |
the size of the cell for pesticide data in m More... | |
int | m_pmap_width |
based on cellsize the width of the map More... | |
int | m_pmap_height |
based on cellsize the height of the map More... | |
bool | m_typeofmap |
true if using test pesticide, false for general pesticides More... | |
Landscape * | m_OurLandscape |
pointer to the landscape More... | |
RasterMap * | m_Rastermap |
pointer to the landscape map More... | |
PesticideMap::PesticideMap | ( | int | a_startyear, |
int | a_noyears, | ||
int | a_cellsize, | ||
Landscape * | a_landscape, | ||
RasterMap * | a_land, | ||
bool | a_typeofmap | ||
) |
PesticideMap::~PesticideMap | ( | ) |
bool PesticideMap::DumpPMap | ( | vector< double > * | a_map | ) |
References g_date, g_msg, Calendar::GetMonth(), Calendar::GetYear(), MapErrorMsg::Warn(), and WARN_FILE.
Referenced by DumpPMapF(), DumpPMapH(), and DumpPMapI().
|
inline |
References DumpPMap(), and m_pmap_fungicides.
|
inline |
References DumpPMap(), and m_pmap_herbicides.
|
inline |
References DumpPMap(), and m_pmap_insecticides.
void PesticideMap::Spray | ( | LE * | a_element_sprayed, |
TTypesOfPesticideCategory | a_type | ||
) |
This records a 1 in the map for every m2 where pesticide is applied. This does not record drift.
Going through the whole landscape is very slow and unnecessary for small polygons. Since our polygons do not extend beyond the edge of the map ie do not wrap round, then we only need a measure of minx, maxx, miny, maxy. This is set up at the start of the simulation.
This method first determines what type of pesticide and selects the correct map to record on.
References fungicide, LE::GetMapIndex(), LE::GetMaxX(), LE::GetMaxY(), LE::GetMinX(), LE::GetMinY(), and herbicide.
|
protected |
the size of the cell for pesticide data in m
|
protected |
last year of data to record
|
protected |
pointer to the landscape
|
protected |
herbicide map data
Referenced by DumpPMapF().
|
protected |
based on cellsize the height of the map
|
protected |
fungicide map data
Referenced by DumpPMapH().
|
protected |
insecticide map data
PesticideMap is a class for handling pesticide mapping output. This can be used to sum up pesticide concentrations over time. It works currently for general pesticides split into insecticides, herbicides, and fungicides, but also for the primary test pesticide if one is being used.
Referenced by DumpPMapI().
|
protected |
based on cellsize the width of the map
|
protected |
pointer to the landscape map
|
protected |
first simultion year to record
|
protected |
true if using test pesticide, false for general pesticides